A hydraulic excavator is a known, typical construction machine. A hydraulic excavator is made up of a front device comprising a boom, an arm and a bucket which are each pivotable in the vertical direction, and a body comprising an upper structure and an undercarriage. The boom of the front device is supported at its base end by a front portion of the upper structure. Such a hydraulic excavator has a feature that the front device is movable in a wide range. This feature is convenient from the working point of view on one side, but, on the other side, requires an operator to carefully perform operation when the hydraulic excavator is used in work where the ground is to be excavated into a particular configuration and the front device should be prevented from projecting excessively. In view of the above, it is proposed to limit a workable area of the front device as disclosed in JP-A-4-136324, for example. As a method of setting an area limit (entrance forbidden area), JP-A-4-136324 discloses a method of moving a tip end of a front device (bucket prong) to the area limit (entrance forbidden area) and memorizing the position of the area limit, or entering the area limit in terms of numerical values from a control panel.
Further, in a hydraulic excavator, front members such as a boom are operated by respective manual control levers. However, because the front members are coupled to each other through articulations for pivoting motion, it is very difficult to carry out excavation work over a predetermined area, particularly an area set by linear lines, by operating the front members. For this reason, there is a demand for enabling such work to be performed in an automatic manner. When a hydraulic excavator is designed to have a function of automating such work, the posture and height of the hydraulic excavator itself are varied due to change in topography of the work site if a body of the excavator is moved. This means that the area set with respect to the body must be set again whenever the body is moved. In view of the above, JP-A-3-295933 proposes an automatic excavation method for facilitating work to be performed within a limited area. The proposed automatic excavation method comprises the steps of detecting a height of an excavator body by a sensor, which is mounted on the body, using a laser beam from a laser oscillator installed on the ground to be excavated, determining an excavation depth (corresponding to an area limit in the above related art) based on the detected height of the body, excavating the ground linearly over a predetermined length while the body is kept stopped, then traveling the body by a predetermined distance, detecting change in height of the body by using the laser beam when excavating the ground linearly again while the body is kept stopped, and modifying the excavation depth in accordance with the detected change in the body height.
Also, U.S. Pat. No. 4,829,418 proposes another automatic excavation method adapted for excavating a linear set area by using a laser beam. This proposed automatic excavation method comprises the steps of setting a desired excavation depth (HTTRGT) with a laser beam as a basis, mounting a laser sensor on an arm, calculating a distance (HTACT) from the laser beam to a bucket prong of a front device at the moment the laser sensor detects the laser beam during excavation, and controlling associated actuators in accordance with a result of comparison between HTTRGT and HTACT so that the bucket prong is moved near the desired excavation depth.
However, the foregoing related arts have problems as follows.
First, with the related art disclosed in JP-A-4-136324, because of an area limit (entrance forbidden area) being set with the body as a basis, if the posture and height of the hydraulic excavator itself are varied due to a change in topography of the work site upon movement of the body, the set depth of the area limit is also varied correspondingly. For example, if the ground surface is inclined, the set depth is changed following a slope of the ground surface with movement of the body and thus the set plane of the area limit is also inclined.
Next, with the related art disclosed in JP-A-3-295933, change in the vehicle height upon movement of the body can be compensated. However, since the excavation depth is set with the body as a basis when it is set from a control panel, manufacturing tolerances of the body or tolerances in accuracy and mounting of angle sensors for measuring a position and posture of the front device for use in control are accumulated as errors when a bucket tip position is calculated in excavation control, and a depth at which the ground is actually excavated is not in agreement with the set excavation depth. Accordingly, excavation cannot be performed as per setting.
Also, since the excavation depth from the body is changed if the body height is changed with movement of the body, resulting change in the excavation depth is also affected by errors of the sensors for measuring a position and posture of the front device, and the excavation depth becomes different between before and after the body height is varied.
Further, in order that the laser beam surely impinges upon the sensor for detection thereof even with the body height changed, many sensors require to be mounted on the body side by side in the height direction, resulting in a large-sized and complicated sensor equipment.
Additionally, since the body height is compensated by using the sensor mounted on the body, the body height capable of being compensated is limited in accordance with restriction imposed from the sensor size.
The related art proposed by U.S. Pat. No. 4,829,418 can solve the problems of the foregoing related arts disclosed in JP-A-4-136324 and JP-A-3-295933 to some degree. With the related art proposed by U.S. Pat. No. 4,829,418, however, since the excavation depth is set with the laser beam as a basis, there arises a problem that the proposed automatic excavation method is not suitable for use in excavation control where calculation necessary for control is made with the body as a basis, e.g., area limiting excavation control proposed by the inventors of this application as an international application numbered PCT/JP95/00843, and reliability of control cannot be ensured.
More specifically, the inventors of this application have proposed, in the international application numbered PCT/JP95/00843, an area limiting excavation control system wherein a target speed vector for control of a front device is calculated with a body as a basis, and when the front device comes close to a boundary of a preset excavation area, a moving speed of the front device in the direction toward the boundary is restricted by modifying the calculated target speed vector, so that the front device is moved along the boundary. Since such area limiting excavation control requires various control variables relating to the target speed vector to be calculated with the body as a basis, setting data for an excavation area, which is set with the laser beam as a basis like U.S. Pat. No. 4,829,418, cannot be directly employed. Therefore, it is required to modify the setting data on the basis of the laser beam to be usable in calculation on the basis of the body. However, a controller has a limit on its memory capacity and a calculation time is prolonged with more complicated calculation. In particular, if the complicated calculation is executed during excavation control, there occurs a delay in the control process and the bucket tip may go out of the boundary of the set area.